package com.db.compare.utils;

import com.alibaba.fastjson.JSONArray;

import java.util.List;

/**
 * 转换数据
 */
public class ConvertUtils {

    public static <T> List<T> convert(List list, Class cls) {
        JSONArray jsonArray = new JSONArray();
        jsonArray.addAll(list);
        List<T> listObject = jsonArray.toJavaList(cls);
        return listObject;
    }
}
